package com.hmall.common.feign;

import com.hmall.common.pojo.Item;
import com.hmall.common.vo.PageVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author leslie
 * @create 2023/9/1 0001 16:51
 */
@FeignClient("itemservice")
public interface ItemClient {
    @GetMapping("/item/list")
    public PageVo<Item> pageQuery(@RequestParam("page") Long page,@RequestParam("size") Long size);
    @GetMapping("/item/order/{id}")
    public Item findItemById(@PathVariable("id") Long id);
    @PutMapping("/item/stock/{itemId}/{num}")
    public void updateStock(@PathVariable(value = "itemId")Long itemId, @PathVariable(value = "num")Integer num);
}
